<template>
  <!-- 反转字符 -->
  <div>
    <p v-html="word"></p>
    <button @click="fanzhuan">点击反转字符</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      word: "123456789",
    };
  },
  methods: {
    fanzhuan() {
      this.word = this.word.split("").reverse().join("");
    },
  },
};
</script>

<style>
</style>